# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Kewl <xrjy@nygb.rh.bet(rot13)>
# Contributor: Justin Settle <jus10 at partlycloudy dot org>

pkgname=ttf-caladea
pkgver=20200113
pkgrel=3
_commit=bea9e4996451fb18e0bdb5cbd177c8a263c0343d
pkgdesc="A serif font family metric-compatible with Cambria font family"
arch=(any)
license=(Apache)
url='https://fonts.google.com/specimen/Caladea'
source=(https://github.com/huertatipografica/Caladea/archive/$_commit.tar.gz
        62-caladea.conf)
sha256sums=('95a01f4a85bc77d52241ad831ef049661e99636fcc83cd1316eef898e82498ce'
            'cd61569289d7a188636df05addd3a744808de38b3d492b3e87c7a060bce4a2e6')

package() {
  cd Caladea-$_commit

  install -Dm644 fonts/ttf/*.ttf -t "$pkgdir"/usr/share/fonts/caladea

  install -Dm644 "$srcdir"/62-caladea.conf -t "$pkgdir"/usr/share/fontconfig/conf.avail
  install -d "$pkgdir"/usr/share/fontconfig/conf.default
  ln -sr "$pkgdir"/usr/share/fontconfig/conf.avail/* "$pkgdir"/usr/share/fontconfig/conf.default/
}
